<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button id="btn1" onclick="test1()">测试alert</button>
    <button id="btn2" onclick="test2()">测试confirm</button>
    <button id="btn3" onclick="test3()">测试prompt</button> 


    <script>
        function test1(){
            window.alert("你好");
        }

        function test2()
		{
			var result = window.confirm("确认要删除么?");
			if(result)
			{
				alert("已删除");
			}else{
                alert("取消删除");
            }
		}

        function test3()
		{
			var name =prompt("请输入你的名字:");
			alert("你的名字是:"+name);
		}
    </script>
</body>
</html>